This invention relates to an image forming apparatus and to an apparatus unit, which has a non-volatile memory, removably attached to the main body of the image forming apparatus. More particularly, the invention relates to an image forming apparatus and to an apparatus unit thereof, wherein even if data in a non-volatile memory has been rewritten as a result of a malfunction in the image forming apparatus, the rewritten content can be restored, without internally providing the non-volatile memory with data back-up area, by controlling the method in which data is written from the main body of the image forming apparatus to the non-volatile memory.
A laser printer 30 shown in FIG. 14 is an example of an electrophotographic printer according to the prior art. The structure and functions thereof are as follows:
An optical unit 5 generates a laser beam 6, and the laser beam 6 thus generated irradiates a photosensitive drum 1. The latter is charged uniformly by a charging roller 2. An electrostatic latent image is formed on the photosensitive drum 1 by the laser beam 6 that irradiates the drum.
The electrostatic latent image formed on the photosensitive drum 1 by the laser beam 6 is developed by toner in a developing unit 3. A transfer charging roller 4 is for transferring the toner image, which has been formed on the photosensitive drum 1, to a prescribed printing paper P. The toner image that has been transferred to the paper P is fused and fixed to the paper P by a fixing unit 7.
Next, the paper P is ejected to the exterior of the machine by ejection rollers 12. An ejection sensor 14 confirms whether or not the paper P has been ejected from the fixing unit 7 normally. The paper P is stacked in a standard cassette 8. The paper P is transported from the standard cassette 8 by a paper feed roller 9, and a registration sensor 13 is used to register the leading edge of the paper in order that the paper P may be printed on. Whether or not paper P is present in the standard cassette 8 is checked using a sensor 15.
In a case where the printing paper P is supplied from a manual feed tray 10, the paper is transported from the manual feed tray by a manual feed roller 11. Whether or not paper P is present in the manual feed tray 10 is checked using a sensor 16.
The above-described photosensitive drum 1, charging roller 2, developing unit 3 and toner are integrated within a toner cartridge 17. The latter has a structure that allows it to be attached to and detached from the laser printer 30. The toner cartridge 17 is fitted with a non-volatile memory 18 storing information relating to the toner cartridge 17 (e.g., status of use of the toner cartridge, whether or not it is necessary to replace the photosensitive drum, etc.).
In the prior art, signals are exchanged between a printer control unit 20, which is provided in the main body of the laser printer 30, and the non-volatile memory 18 mounted on the toner cartridge 17, via a connector 19. The printer control unit 20 writes data relating to, say, the status of use of the toner cartridge, to the non-volatile memory 18 and exercises control of the toner cartridge using this data, e.g., performs control such as management of whether or not the photosensitive drum requires replacement.
FIG. 15 is a block diagram illustrating the printer control unit 20 according to the prior art.
The functions of various blocks will be described first. A printer controller 101 communicates with a host computer (not shown), receives image data, expands the received image data into information capable of being printed by the printer, and exchanges signals with and communicates serially with a printer-engine controller 102, described later.
The engine controller 102 exchanges signals with the printer controller 101 and controls the various blocks, described later, of the printer control unit 20 via serial communication. A paper transport controller 103 feeds and transports printing paper up to the point of paper ejection following printing in accordance with a command from the engine controller 102, and an optics controller 104 drives a scanner motor (not shown) and controls the ON/OFF operation of the laser beam 6 in accordance with a command from the engine controller 102.
A high-voltage controller 105 controls the output of high voltage, which is necessary for the charging, development and transfer steps of the electro-photographic process, in accordance with a command from the engine controller 102, and a fixing-temperature controller 106 controls the temperature of the fixing unit 7 in accordance with a command from the engine controller 102, and senses malfunction of the fixing unit 7.
If information from a sensor indicating whether or not paper is present in the paper feeder and paper transport path, information indicative of a transport problem during paper transport or information indicative of a malfunction in any of the functional blocks of the printer is sensed by a paper-presence sensor input unit 107, jam sensor 108 or malfunction sensor 109, these sensors send the information to the engine controller 102.
The toner cartridge 17 has a structure that allows it to be attached to and detached from the printer control unit 20. The toner cartridge 17 is internally equipped with the non-volatile memory 18 capable of sending data to and receiving data from the engine controller 102. Data can be read out of the engine controller 102 and data can be written to the engine controller 102.
On the basis of data sensed by the printer controller 101 or printer control unit 20, the engine controller 102 reads out the content of the non-volatile memory 18 or rewrites the content of the non-volatile memory 18.
FIGS. 16 and 17 illustrate the exchange of signals between the printer control unit 20 and non-volatile memory 18. The printer control unit 20 has an internal CPU 120 connected by a serial communication line to the non-volatile memory 18 inside the toner cartridge 17 via a drawer connector 121.
The serial communication line comprises TDATA 124, which is command data output from the printer control unit 20 to the non-volatile memory 18, RDATA 125, which is status sent back from the non-volatile memory 18, SCLK 126, which is a synchronizing clock, power supply VCC 122 and ground GND 123.
TDATA 124 is a signal transmitted if the printer control unit 20 reads out the content of the non-volatile memory 18 and if the printer control unit 20 rewrites the content of the non-volatile memory 18. Read-out/rewrite is specified using a command 127 (FIG. 17).
Further, TDATA 124 transmits, in series following the command 127, an address 128 to an address from which data is desired to be read, and data 129 if the data is desired to be rewritten.
If data is to be read out of the non-volatile memory 18 in response to the command 127 of TDATA 124, an address 130 and the data 131 are sent back. If the non-volatile memory 18 is to be rewritten, the address 130 and write data 131 are sent back.
The conventional non-volatile memory 18 only has functions relating to the above-described read-out and write operations. For example, if the printer control unit 20 writes data that is important in terms of control, such as whether it is necessary to replace the toner cartridge 17 or not, to the non-volatile memory 18, the memory 18 allows this important data to be recovered if it has been rewritten inadvertently due to effects of a malfunction or the like.
The method of recovering this important data is implemented by allocating, to a plurality of addresses, an area to which the important data is to be written. That is, even if a certain data area has been written due to effects of a malfunction or the like, the information at another address is read to perform control so as to recover the data or prevent the data from being lost.
More specifically, a single data content is stored in data areas having two different addresses and an error check function such as a check sum is provided for each address. As a result, if a malfunction such as interruption of power occurs during the writing of data content to one of the data areas and, as a consequence, the writing of the data ceases in mid-course, the check sums of the two data areas are checked after power is restored. Then, if both data areas indicate the same value and the check sums are correct, it is judged that both areas are normal. If the check sum is abnormal for one of the data areas, then the content of the data area for which the check sum is normal is written again to the data area that was judged to be abnormal. This makes it possible to restore the immediately preceding data that was rewritten due to effects of the malfunction.
FIG. 18 illustrates the addresses and structure of the content of the above-described memory according to the prior art.
The memory is provided with areas for writing memory content A141 to A146, and with a check-sum area 147 for the above-mentioned content. The memory is further provided with back-up areas 149 to 154 for writing content identical with that of the content A to F, and with a check-sum area 155 for the content A to F.
FIG. 19 illustrates a flowchart indicating processing for writing data to, e.g., the memory content A141 in accordance with this arrangement. This will now be described.
First, at step S301, data is written to the address of memory content A, then, at step S302, verification is performed to determine whether the write operation ended normally. If the write operation ended normally (xe2x80x9cYESxe2x80x9d at step S303), control proceeds to step S304, where check sums relating to the areas of memory content A to F are written.
This is followed by step S305, where verification is performed to determine whether the write operation ended normally or not. If the write operation ended normally (xe2x80x9cYESxe2x80x9d at step S306), the write operation regarding the area A is terminated.
Similarly, data is written to the back-up address of memory content A at step S307 and verification is performed at step S308 to determine whether the write operation ended normally or not. If the write operation ended normally (xe2x80x9cYESxe2x80x9d at step S309), then check sums relating to the back-up areas of memory content A to F are written at step S310. This is followed by step S311, where verification is performed to determine whether the write operation ended normally or not. If the write operation ended normally (xe2x80x9cYESxe2x80x9d at step S312), the write operation regarding back-up of the area A is terminated.
By thus writing the same data to two data areas, any cut-off of power during the-writing of data to the memory content A can be dealt with by subsequently recovering the data using the back-up content of memory content A.
However, with the example of the prior art described above, if a data area in the non-volatile memory mounted on the apparatus unit of the image forming apparatus has been rewritten because of a malfunction of some kind, then, in order to restore the content that prevailed prior to the rewrite, the data necessary for restoration must be saved beforehand in a different memory area of the non-volatile memory. This means that a part of the non-volatile memory is used at all times as a back-up memory area for error recovery, as a consequence of which the non-volatile memory cannot be utilized efficiently. If a memory area for saving a large quantity of data is required, then use must be made of a non-volatile memory having a large-capacity memory area.
Accordingly, an object of the present invention is to provide an image forming apparatus constituted by an image forming apparatus main body and an apparatus unit, which has a non-volatile memory, removably attached to the image forming apparatus main body, wherein by controlling the method through which data is written from the image forming apparatus main body to the non-volatile memory, data content that has been rewritten in the non-volatile memory due to the occurrence of a malfunction in the image forming apparatus can be restored without providing a data back-up area in the non-volatile memory.
Another object of the present invention is to provide the apparatus unit.
According to the present invention, the foregoing objects are attained by providing an image forming apparatus having an image forming apparatus main body and an apparatus unit, which has memory means, removably attached to the image forming apparatus main body, the apparatus comprising: measurement means for measuring status of use of the apparatus unit; determination means for determining, using a measurement value obtained by the measurement means, whether replacement of the apparatus unit is necessary; data update means for updating prescribed data, which has been stored in the memory means, if the determination means has determined that replacement is necessary; and data update control means for controlling updating of the prescribed data to be updated by the data update means.
Further, according to the present invention, the foregoing objects are attained by providing an apparatus unit, which has memory means, removably attached to an image forming apparatus main body, wherein the memory means comprises: a first storage area for storing data representing amount of use of the apparatus unit; a second storage area for storing replace information indicating that replacement of the apparatus unit is necessary; and a third storage area for storing write-protect data for inhibiting a change in the second storage area.
The present invention further provides a method of controlling an image forming apparatus including an image forming apparatus main body and an apparatus unit provided with a memory having a first storage area for storing data representing amount of use of the apparatus unit, a second storage area for storing replace information indicating that replacement of the apparatus unit is necessary, and a third storage area for storing write-protect data for inhibiting a change in the second storage area, the apparatus unit being removably attached to the image forming apparatus main body, the method comprising: an amount-of-use detecting step of detecting amount of use of the apparatus unit and writing the amount of use to the memory; a determination step of determining, on the basis of the amount of use, whether replacement of the apparatus unit is necessary and writing the replace information to the memory if it is determined that replacement is necessary; and a recovery step of determining whether processing for writing the replace information at the determination step ended normally and ending normally the processing for writing the replacement information if it is determined that the processing did not end normally.
Other features and advantages of the present invention will be apparent from the following description taken in conjunction with the accompanying drawings, in which like reference characters designate the same or similar parts throughout the figures thereof.